package week1;

import java.util.Scanner;

public class T5 {
    public static void main(String[] args) {

        int cnt=0;

        Scanner scanner1=new Scanner(System.in);
        int n=scanner1.nextInt();


        Scanner scanner=new Scanner(System.in);
        String input=scanner.nextLine();
        String[] elements=input.split(" ");
        int[] array=new int[elements.length];
        for (int i=0;i<elements.length;i++){
            array[i]=Integer.parseInt(elements[i]);
        }

        int[] result=new int[elements.length];
        //find
        for (int i=0;i<elements.length;i++){
            cnt=0;
            for (int j=0;j<i;j++){
                if (array[j]<array[i]){
                    cnt++;
                }
            }
            result[i]=cnt;
        }

        //sout
        for (int i=0;i<elements.length;i++){
            System.out.print(result[i]+" ");
        }

    }
}